package cn.ldh.controller;


import cn.ldh.domain.Store;
import cn.ldh.service.IStoreService;
import cn.ldh.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/store")
public class StoreController {
    @Autowired
    private IStoreService service;
    @PostMapping("/save")
    public JsonResult save(@RequestBody Store store){
        service.add(store);
        return new JsonResult();
    }
}
